package lab02.Test22;

/**
 * Created by Administrator on 2017/10/31.
 */
public class Test {
    public static void main(String[] args) {
        String S ="ABCDccv你好！";
        System.out.println("原字符:"+S);
        StringBuffer s=new StringBuffer();
        for ( int i=0;i<S.length();i++){
            char ch=S.charAt(i);
            if (ch>='A'&&ch<='Z'){
                s.append(Character.toLowerCase(ch));
            }
            else if (ch>='a'&&ch<='z'){
                s.append(ch);
            }
            else if (ch>=49&&ch<=58){
                s.append(0);
            }
            else {
                s.append('#');
            }
        }
        System.out.println("转换后:"+s);
    }
}
